package com.james.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

/**
  * @ClassName: Menu
  * @Author: JamesWang
  * @Date: 2021/4/22 12:26
  * @Description:  
  * @Version:1.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "sy_menu")
public class Menu implements Serializable {
    /**
     * 菜单id
     */
    @TableId(value = "menu_id", type = IdType.INPUT)
    private Integer menuId;

    /**
     * 父节点id
     */
    @TableField(value = "parent_id")
    private Integer parentId;

    /**
     * 菜单名称
     */
    @TableField(value = "menu_name")
    private String menuName;

    /**
     * 菜单图标
     */
    @TableField(value = "menu_icon")
    private String menuIcon;

    /**
     * 菜单状态（0:禁用 1:正常）
     */
    @TableField(value = "menu_status")
    private Integer menuStatus;

    @TableField(exist = false)
    private List<Menu> childMenu;

    private static final long serialVersionUID = 1L;

    public static final String COL_MENU_ID = "menu_id";

    public static final String COL_PARENT_ID = "parent_id";

    public static final String COL_MENU_NAME = "menu_name";

    public static final String COL_MENU_ICON = "menu_icon";

    public static final String COL_MENU_STATUS = "menu_status";
}